Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit 919bddb703eff9293addb3b9246a531c4542a9f4


Parents : 458e40c
Author : Mark Qvist <mark@unsigned.io>
Date : 2025-01-17T10:44:46+01:00

Cleanup

Changes

1 files changed, 0 insertions(+), 23 deletions(-)

M sx126x.cpp -23

Diff

diff --git a/sx126x.cpp b/sx126x.cpp
index c890c62..4c06862 100644
--- a/sx126x.cpp
+++ b/sx126x.cpp
@@ -389,30 +389,12 @@ int sx126x::endPacket() {
if (timed_out) { return 0; } else { return 1; }
}
-/////////////////////////////////////////
-// #define PIN_PREAMBLE 46
-// #define PIN_HEADER 45
-// #define PIN_FALSE 48
-// #define PIN_DCD 47
-// bool ps = false;
-/////////////////////////////////////////
-
unsigned long preamble_detected_at = 0;
extern long lora_preamble_time_ms;
extern long lora_header_time_ms;
bool false_preamble_detected = false;
bool sx126x::dcd() {
- /////////////////////////////////////////
- // if (!ps) {
- // pinMode(PIN_PREAMBLE, OUTPUT);
- // pinMode(PIN_HEADER, OUTPUT);
- // pinMode(PIN_FALSE, OUTPUT);
- // pinMode(PIN_DCD, OUTPUT);
- // ps = true;
- // }
- /////////////////////////////////////////
-
uint8_t buf[2] = {0}; executeOpcodeRead(OP_GET_IRQ_STATUS_6X, buf, 2);
uint32_t now = millis();
@@ -434,11 +416,6 @@ bool sx126x::dcd() {
}
}
- // if (preamble_detected_at != 0) { digitalWrite(PIN_PREAMBLE, HIGH); } else { digitalWrite(PIN_PREAMBLE, LOW); }
- // if (header_detected) { digitalWrite(PIN_HEADER, HIGH); } else { digitalWrite(PIN_HEADER, LOW); }
- // if (false_preamble_detected) { digitalWrite(PIN_FALSE, HIGH); } else { digitalWrite(PIN_FALSE, LOW); }
- // if (carrier_detected) { digitalWrite(PIN_DCD, HIGH); } else { digitalWrite(PIN_DCD, LOW); }
-
// TODO: Maybe there's a way of unlatching the RSSI
// status without re-activating receive mode?
if (false_preamble_detected) { sx126x_modem.receive(); false_preamble_detected = false; }


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────